﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SlamDunk.CMS.Model
{	
    /// <summary>
    /// LoginLog视图模型类
    /// </summary>
	[Serializable]
	public class LoginLogView
	{	
        #region 01.属性——Id
        /// <summary>
        /// 属性——Id
        /// </summary>
		public int Id { get; set; }
        #endregion
        
        #region 02.属性——UserId
        /// <summary>
        /// 属性——UserId
        /// </summary>
		public int UserId { get; set; }
        #endregion
        
        #region 03.外键属性——User
        /// <summary>
        /// 外键属性——User
        /// </summary>
        public User User { get; set; }
        #endregion
        
        #region 04.属性——IPAddress
        /// <summary>
        /// 属性——IPAddress
        /// </summary>
		public string IPAddress { get; set; }
        #endregion
        
        #region 05.属性——Status
        /// <summary>
        /// 属性——Status
        /// </summary>
		public bool? Status { get; set; }
        #endregion
        
        #region 06.属性——Browser
        /// <summary>
        /// 属性——Browser
        /// </summary>
		public string Browser { get; set; }
        #endregion
        
        #region 07.属性——DelFlag
        /// <summary>
        /// 属性——DelFlag
        /// </summary>
		public bool DelFlag { get; set; }
        #endregion
        
        #region 08.属性——AddTime
        /// <summary>
        /// 属性——AddTime
        /// </summary>
		public DateTime? AddTime { get; set; }
        #endregion
        
        #region 方法——转换为数据模型
        /// <summary>
        /// 转换为数据模型
        /// </summary>
        /// <returns>LoginLog数据模型对象</returns>
        public Model.LoginLog ToDataModel()
        {
            return new Model.LoginLog()
            {
                Id = this.Id,
                UserId = this.UserId,
                IPAddress = this.IPAddress,
                Status = this.Status,
                Browser = this.Browser,
                DelFlag = this.DelFlag,
                AddTime = this.AddTime,
            };
        }
        #endregion
	}
}
